<?php 
class SF_Orderrepayment_Helper_Data extends Mage_Core_Helper_Abstract
{
            public function repayorder(Mage_Sales_Model_Order $order){
                $close_repay = Mage::getStoreConfig("repay/config/closerepay");
                if ($order->getCustomerId() != Mage::getSingleton('customer/session')->getCustomerId()) {
                    return false;
                    die;
                }  
                if($order->getStatus()=="payment_fail"&&$close_repay!=="1"){
                    return true;
                    die;
                }
                return false;
            }
}